package com.stt.experiment.trynetty.Action;

import com.alibaba.fastjson.JSON;
import com.stt.experiment.trynetty.buffer.RequestBuffer;
import com.stt.experiment.trynetty.buffer.ResponseBuffer;
import com.stt.experiment.websocket.action.dispatcher.annotation.ReqAction;
import com.stt.experiment.websocket.action.dispatcher.annotation.ReqMethod;

@ReqAction(module = "helloNetty")
public class HelloNettyAction {

    @ReqMethod("sayHello")
    public void sayHello(RequestBuffer buffer) {
        buffer.reply(new ResponseBuffer(buffer, JSON.toJSONString("hello-netty")));
    }

}
